#!/usr/bin/env node
let addr = 'http://wangding:123@www.baidu.com:8080/a/b/c?age=20&gender=M#/d/e/f';
const url = require('url'),
      qs = require('querystring'),
      log = console.log;
addr = url.parse(addr);
/*
log(addr.protocol);
log(addr.username);
log(addr.passward);
log(addr.hostname);
log(addr.port);
log(addr.pathname);
log(addr.query);
log(addr.hash);
log(qs.parse(addr.query));
*/

log(addr);




